<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>Mode Iterators (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="Mode Iterators (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="Mode Iterators (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Option-Index.html" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Iterators.html" rel="up" title="Iterators">
<link href="Code-Iterators.html" rel="next" title="Code Iterators">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
ul.mark-bullet {list-style-type: disc}
-->
</style>


</head>

<body lang="en">
<div class="subsection-level-extent" id="Mode-Iterators">
<div class="nav-panel">
<p>
Next: <a href="Code-Iterators.html" accesskey="n" rel="next">Code Iterators</a>, Up: <a href="Iterators.html" accesskey="u" rel="up">Iterators</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="Mode-Iterators-1"><span>17.23.1 Mode Iterators<a class="copiable-link" href="#Mode-Iterators-1"> &para;</a></span></h4>
<a class="index-entry-id" id="index-mode-iterators-in-_002emd-files"></a>

<p>Ports often need to define similar patterns for two or more different modes.
For example:
</p>
<ul class="itemize mark-bullet">
<li>If a processor has hardware support for both single and double
floating-point arithmetic, the <code class="code">SFmode</code> patterns tend to be
very similar to the <code class="code">DFmode</code> ones.

</li><li>If a port uses <code class="code">SImode</code> pointers in one configuration and
<code class="code">DImode</code> pointers in another, it will usually have very similar
<code class="code">SImode</code> and <code class="code">DImode</code> patterns for manipulating pointers.
</li></ul>

<p>Mode iterators allow several patterns to be instantiated from one
<samp class="file">.md</samp> file template.  They can be used with any type of
rtx-based construct, such as a <code class="code">define_insn</code>,
<code class="code">define_split</code>, or <code class="code">define_peephole2</code>.
</p>

<ul class="mini-toc">
<li><a href="Defining-Mode-Iterators.html" accesskey="1">Defining Mode Iterators</a></li>
<li><a href="Substitutions.html" accesskey="2">Substitution in Mode Iterators</a></li>
<li><a href="Examples.html" accesskey="3">Mode Iterator Examples</a></li>
</ul>
</div>



</body>
</html>
